//
//  AZLocationHandler.h
//  mobile
//
//  Created by abc on 2018/9/19.
//  Copyright © 2018年 azazie. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

NS_ASSUME_NONNULL_BEGIN

FOUNDATION_EXTERN NSString *const APPLocationDidChangeNotification;

FOUNDATION_EXTERN NSString *const LocationCookieName;
FOUNDATION_EXTERN NSString *const CurrencyCodeCookieName;

typedef NS_ENUM(NSUInteger, AZLocationAddress) {
    AZLocationAddress_America = 0,
    AZLocationAddress_Canada = 1,
    AZLocationAddress_Au = 3,
    AZLocationAddress_Gb = 5,
    AZLocationAddress_unKnow = 7,
};

@interface AZLocationHandler : NSObject <NSCopying, NSSecureCoding, CLLocationManagerDelegate>

@property (nonatomic, assign) AZLocationAddress location;

+ (AZLocationHandler *)defaultHaandler;
+ (NSString *)getCountryCode; // 获取国家code
+ (NSString *)getCurrencyCode; // 获取货币符号

+ (void)setLocation:(NSString *)countryStr;

+ (BOOL)isCanadaLocated;
+ (BOOL)isAmericaLocated;

+ (void)startDefaultLocat;

+ (NSString *)currentDomainString;

- (instancetype _Nullable)initWithLocation:(AZLocationAddress)location;

@end

NS_ASSUME_NONNULL_END
